package ptaHhl;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			int num =0;
			String A=in.next();
			String B=A;
			char[] arry;
		    arry=B.toCharArray();
		    for(int i=0;i<A.length();i++)
		    {
		    	if(arry[i]!='.'&&arry[i]!='-')
		    	{
		    		num=num+arry[i]-48;
		    	}
		    		
		    }
			System.out.println(num);
		}

	}

}
